import Cookies from 'js-cookie'

const TokenKey = 'time_post_office_token';

/**
 * @description 从浏览器中Cookies
 * @param null
 * @returns Cookies
 */
export function getToken() {
  return Cookies.get(TokenKey)
}

/**
 * @description 在浏览器中设置Cookies
 * @param token
 * @returns null
 */
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

/**
 * @description 从浏览器中删除Cookies
 * @param null
 * @returns null
 */
export function removeToken() {
  return Cookies.remove(TokenKey)
}
